package com.trkj.dao.jpa;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import com.trkj.pojos.CcDoctorAdvice;

public interface CcDoctorAdviceDAO extends CrudRepository<CcDoctorAdvice, Long> {

	@Query("select c from CcDoctorAdvice c where c.printstaff=?1 order by c.printdate desc")
	public List<CcDoctorAdvice>  queryAllCcDoctorAdvice(Pageable pageable,BigDecimal printstaff);

	@Query("select count(*) from CcDoctorAdvice c where c.printstaff=?1")
	public long  queryByCount(BigDecimal elePerid);
	
	@Query("select c from CcDoctorAdvice c where c.daId=?1")
	public CcDoctorAdvice  queryByOne(long daId);
	@Query("select c from CcDoctorAdvice c where c.elePerid=?1 order by c.printdate desc")
	public List<CcDoctorAdvice>  queryByelePerid(BigDecimal elePerid);

	
}
